<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>用户管理</title>
    <style>
        .select2 {
            width: 259px !important;
        }

        .select2-selection {
            border: 1px solid #d2d6de !important;
            border-radius: 0px !important;
            height: 33px !important;

        }
    </style>
</head>
<body>
<div class="box">
    <div class="box-body">
        <div class="nav-tabs-custom">
            <ul id="ul" class="nav nav-tabs pull-right">
                <li><a id="otherUser" href="" data-toggle="tab">客户用户管理</a></li>
                <li class="active"><a href="#own_user_tables" data-toggle="tab">本公司用户管理</a></li>
                <li class="pull-left header"><i class="fa fa-exclamation"></i> 用户管理（本公司/客户）</li>
            </ul>
            <div class="tab-content no-padding">
                <div class="chart tab-pane" id="all_user_tables">
                    <table id="mainDataTables" class="table table-bordered table-striped" cellspacing="0" width="100%">
                        <thead>
                        <tr>
                            <th><input onchange="$.checkChange(1)" type="checkbox" id="batch_check"></th>
                            <th>序号</th>
                            <th>账号</th>
                            <th>昵称</th>
                            <th>性别</th>
                            <th>公司</th>
                            <th>手机号码</th>
                            <th>角色信息</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                    </table>
                </div>
                <div class="chart tab-pane active" id="own_user_tables">
                    <table id="mainDataTables2" class="table table-bordered table-striped" cellspacing="0" width="100%">
                        <thead>
                        <tr>
                            <th><input onchange="$.checkChange(11)" type="checkbox" id="batch_check2"></th>
                            <th>序号</th>
                            <th>账号</th>
                            <th>昵称</th>
                            <th>性别</th>
                            <th>公司</th>
                            <th>手机号码</th>
                            <th>角色信息</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 信息对话框 -->
<div id="modal-user" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="label-user"
     aria-hidden="true">
    <div class="modal-dialog" style="width: 400px;">
        <div class="modal-content">
            <form id="form-user" name="form-user" class="form-horizontal" role="form" method="post">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                            onclick="$.clearModal($('#form-user'), $('#modal-user'))">
                        <span aria-hidden="true">&times;</span></button>
                    <b class="modal-title" id="label-user"></b>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label for="loginPwd" class="col-sm-3 control-label">账号</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="loginName" name="loginName"
                                   placeholder="登录账号">
                            <small>添加后不可修改，长度为6到30</small>
                            <small id="small" style="color: #dd4b39">该账号名已被占用</small>
                        </div>
                    </div>
                    <div class="form-group" id="password">
                        <label for="loginPwd" class="col-sm-3 control-label">密码</label>
                        <div class="col-sm-9">
                            <input type="password" class="form-control" id="loginPwd" name="loginPwd" readonly
                                   placeholder="登录密码">
                            <small>默认密码为6个6，添加后自行修改</small>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="userName" class="col-sm-3 control-label">名称</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="userName" name="userName"
                                   placeholder="用户名称">
                        </div>
                    </div>
                    <div class="form-group" id="orgSelect">
                        <label for="orgId" class="col-sm-3 control-label">公司</label>
                        <div class="col-sm-9">
                            <select class="form-control " id="orgId"></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="myActor" class="col-sm-3 control-label">角色</label>
                        <div class="col-sm-8">
                            <input class="form-control" id="myActor" placeholder="点击按钮分配" readonly>
                        </div>
                        <div class="col-sm-1">
                            <button type="button" id="setActor"
                                    style="height: 34px;float: right;">
                                <i class="glyphicon glyphicon-user"></i>
                            </button>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="userMobile" class="col-sm-3 control-label">号码</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="userMobile" name="userMobile"
                                   placeholder="手机号码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">性别</label>
                        <div class="col-sm-4" id="sex">
                            <label>
                                <input type="radio" id="male" name="mySex" value="男"> 男
                            </label>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <label>
                                <input type="radio" id="female" name="mySex" value="女"> 女
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="userEmail" class="col-sm-3 control-label">Email</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="userEmail" name="userEmail"
                                   placeholder="电子邮箱">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="userState" class="col-sm-3 control-label">状态</label>
                        <div class="col-sm-9">
                            <select class="form-control" id="userState" name="userState">
                                <option value="0">正常</option>
                                <option value="1">停用</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="userRemarks" class="col-sm-3 control-label">备注</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="userRemarks" name="userRemarks"
                                   placeholder="备注信息">
                        </div>
                    </div>
                </div>
                <input type="hidden" id="userId" name="userId"/>
                <input type="hidden" id="userSex" name="userSex"/>
                <div class="modal-footer">
                    <button type="button" class="btn btn-warning pull-left btn-flat" data-dismiss="modal"
                            onclick="$.clearModal($('#form-user'), $('#modal-user'))"><i class="fa fa-trash-o"></i> 取消
                    </button>
                    <button type="button" id="resetPsw" class="btn btn-primary btn-flat"><i class="fa  fa-key"></i> 重置密码
                    </button>
                    <button type="submit" class="btn btn-primary btn-flat"><i class="fa fa-save"></i> 保存
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<!--角色分配模态框-->
<div id="modal-setActor" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="label-setActor"
     aria-hidden="true">
    <div class="modal-dialog" style="width: 400px;">
        <div class="modal-content">
            <form id="form-actor" name="form-user" class="form-horizontal" role="form" method="post">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                            onclick="$.cleanActorModal()">
                        <span aria-hidden="true">&times;</span></button>
                    <b class="modal-title" id="label-actor">角色分配</b>
                </div>
                <div class="modal-body">
                    <div class="box">
                        <div class="box-body">
                            <table id="ActorTable" class="table table-bordered table-striped" cellspacing="0"
                                   width="100%">
                                <thead>
                                <tr>
                                    <th style="text-align:center"><input onchange="$.checkChange(2)" type="checkbox"
                                                                         id="actor_check"></th>
                                    <th style="text-align:center">角色</th>
                                    <th style="text-align:center">简介</th>
                                </tr>
                                </thead>
                                <tbody id="tbody"></tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-warning pull-left btn-flat" data-dismiss="modal"
                            onclick="$.cleanActorModal()"><i class="fa fa-trash-o"></i> 取消
                    </button>
                    <button type="button" onclick="$.setActor()" class="btn btn-primary btn-flat"><i
                            class="fa fa-save"></i> 保存
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>

<!--角色分配模态框-->
<div id="modal-mainOrg" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="label-setActor"
     aria-hidden="true">
    <div class="modal-dialog" style="width: 300px;">
        <div class="modal-content">
            <form id="form-mainOrg" name="form-user" class="form-horizontal" role="form" method="post">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                            onclick="$.clearModal($('#form-mainOrg'),$('#modal-mainOrg'))">
                        <span aria-hidden="true">&times;</span></button>
                    <b class="modal-title" id="label-mainOrg">监管单位</b>
                </div>
                <div class="modal-body">
                    <ul id="mainOrgList">

                    </ul>
                </div>
                <div class="modal-footer">
                    <button type="button" onclick="$.clearModal($('#form-mainOrg'),$('#modal-mainOrg'))"
                            class="btn btn-primary btn-flat"><i
                            class="fa fa-save"></i> 确定
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>

<script src="system/user.js"></script>
</body>
</html>
